ostree-pull: Fix segfault by initializing pull_data earlier
authorAdrian Perez <aperez@igalia.com>
Wed, 9 May 2012 15:49:03 +0000 (18:49 +0300)
committerColin Walters <walters@verbum.org>
Wed, 9 May 2012 18:10:23 +0000 (14:10 -0400)
commitbd6bd0eed5bc5f8082c8982ccaaea82f9312f9d1
tree1a4ffc4f6a4ca433e16de3aa5294b24228e48f06
parentd9bc7e0acdf40bd1e700a3f2fffe24430c550a00
ostree-pull: Fix segfault by initializing pull_data earlier

In the case of not being able to check the repository or not being able
to parse command line arguments, attributes from "pull_data" would be used
with garbage in them. This patch makes initialization of the sctructure to
happen earlier so it is safe to use in those cases.
src/ostree/ostree-pull.c